//
//  SequentialQuestionStrategy.swift
//  RabbleWabble
//
//  Created by TRS-Mobile on 2021/9/8.
//

import Foundation

class SequentialQuestionStrategy: BaseQuestionStrategy {
    
//    private let questionGroup: QuestionGroup
//    private var questionIndex: Int = 0
    
//    init(questionGroup: QuestionGroup) {
//        self.questionGroup = questionGroup
//    }
    
    convenience init(caretaker: QuestionGroupCaretaker) {
        let questionGroup =
            caretaker.selectedQuestionGroup!
        let questions = questionGroup.questions
        self.init(caretaker: caretaker,
                  questions: questions)
    }
    
    
//    var title: String {
//        return questionGroup.title
//    }
//
//    var correctCount: Int {
//        get {
//            return questionGroup.score.correctCount
//        }
//        set {
//            questionGroup.score.correctCount = newValue
//        }
//    }
//
//    var incorrectCount: Int {
//        get {
//            return questionGroup.score.incorrectCount
//        }
//        set {
//            return questionGroup.score.incorrectCount = newValue
//        }
//    }
//
//    func advanceToNextQuestion() -> Bool {
//        questionIndex += 1
//        guard questionIndex < questionGroup.questions.count else {
//            return false
//        }
//        return true
//    }
//
//    func currentQuestion() -> Question {
//        return questionGroup.questions[questionIndex]
//    }
//
//    func makeQuestionCorrect(_ question: Question) {
//        correctCount += 1
//    }
//
//    func makeQuestionIncorrect(_ question: Question) {
//        incorrectCount += 1
//    }
//
//    func questionIndexTitle() -> String {
//        return "\(questionIndex + 1)/" + "\(questionGroup.questions.count)"
//    }
}


